package com.ihr360.payroll.dao;

import com.ihr360.payroll.model.dto.salary.report.MergeSalaryReportTermSalary;
import com.ihr360.payroll.type.ReportState;
import com.ihr360.rest.reposity.SimpleRestReposity;

import java.util.List;

/**
 * Created by Eric on 2018/4/12/012.
 */
public interface MergeSalaryReportTermSalaryRepository extends SimpleRestReposity<MergeSalaryReportTermSalary, Long> {
    MergeSalaryReportTermSalary findByCompanyIdAndMergeReportIdAndYearAndMonthAndIndexno(String companyId, Long mergeReportId, int year, int month, Integer indexno);

    void deleteByCompanyIdAndMergeReportId(String companyId, Long mergeReportId);

    List<MergeSalaryReportTermSalary> findByCompanyIdAndMergeReportIdInAndYearAndMonthAndIndexnoIn(String companyId, List<Long> mergeReportIdList, int year, int month, List<Integer> indexList);

    List<MergeSalaryReportTermSalary> findByCompanyIdAndMergeReportIdAndYearAndMonthAndReportState(String companyId, Long mergeReportId, int year, int month, ReportState state);

    List<MergeSalaryReportTermSalary> findByCompanyIdAndMergeReportIdAndYearAndReportState(String companyId, Long mergeReportId, int year, ReportState state);

    List<MergeSalaryReportTermSalary> findByCompanyIdAndMergeReportIdAndReportStateOrderByYear(String companyId, Long mergeReportId, ReportState state);


}
